home *** CD-ROM | disk | FTP | other *** search
- #######################################
- # Function findports #
- # will find out which ports a server #
- # uses to connect to other servers #
- # /findports <servername> #
- # TG!cedras@rahul.net #
- #######################################
-
- alias findports {
- ^on ^211 -
- ^assign -server_inquired
- ^assign -found_ports
- ^assign -server_inquired
- ############ The following is to allow us to enter wildcards (*) and
- ############ to compare our entry to the //links entry so we can get
- ############ the full server name.
- ^on #^364 -567 * assign server_inquired $$1
- ^set display off
- //links $0
- wait
- ^on #^364 -567 -*
- ############
- echo *** Please be patient...inquiring server $server_inquired
- echo Do not reissue command until done
- portf $server_inquired
- }
-
-
- alias portf {
- ^assign -connecting_port
- ^assign -port_output
- ^assign -serverp
- ^assign -serverp_size
-
- ^assign serverp $0
- ^assign serverp_size $@serverp
-
- ^on #^211 -567 * if ( match($serverp $left($serverp_size $1)) ) {
- ^assign connecting_port $1
- @port_output = port_output ## [$lastbit($connecting_port) ]
- }
-
- //stats L $serverp
- wait
- wait
- timer 5 fportclean
- @function_return = [$port_output]
- }
-
- alias fportclean {
- timer 3 comment
- ^on #^211 -567 -*
- echo *** The port(s) for server $server_inquired are:
- echo $port_output
- echo Done!
- ^on ^211 * ^echo $stu($[40]1) $stu($left(19 $7-));echo $[10]2 $[10]3 $[10]4 $[10]5 $[7]6
- ^on ^211 "% *.*[*.*] *" $stu($[40]1) $stu($left(19 $7-));echo $[10]2 $[10]3 $[10]4 $[10]5 $[7]6
- ^on ^211 "% *[*" if (trace) {^echo $stu($[40]1) $stu($left(19 $7-));echo $[10]2 $[10]3 $[10]4 $[10]5 $[7]6}
- ^set display on
- }
-
-
- alias lastbit {
- ^assign -lastbits
- ^assign -lastbits2
- @lastbits = rindex(. $0)
- @lastbits = lastbits + 1
- @lastbits2 = mid($lastbits $lastbits $0)
- @function_return = strip(] $lastbits2)
- }
-
-